<div class="container">
  <ol class="breadcrumb">
    <li><?php echo anchor('', 'Início'); ?></li>
    <li><?php echo anchor('paravoce', 'Para Você'); ?></li>
    <li class="active">Meu Cadastro</li>
  </ol>
</div>

<div class="container">

	<div class="row">
		<?php $this->load->view('paravoce/_sidebar'); ?>

	    <div class="col-md-9 col-lg-9 form-group">

	      	<h3 class="titulos">Dados Cadastrais</h4>
	      	<?php
	        if(!empty($formMessage))
	        {
	          $cssOptions = array('alert-danger', 'alert-warning', 'alert-success');
	          $cssAlert = $cssOptions[$formMessage[0]-1]; ?>
				<div class="alert <?php echo $cssAlert; ?>">
					<?php echo $formMessage[1]; ?>
				</div>
		    <?php
		    } 
			$hidden = array('datetime' => date('Ymdhmi'));
			$attributes = array('role'=>'form', 'id'=>'frm_cadastro');
		    echo form_open('paravoce/cadastro', $attributes, $hidden);
		    ?>

	        <div class="row">
	        	<br>
	          	<div class="col-md-5 col-lg-5 form-group">
		            <label for="email_cliente">Email:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
		            <?php echo $formdata['email_cliente']; ?>
	          	</div>

	          	<div class="col-md-3 col-lg-3 form-group">
		            <label for="cpf_cliente">CPF:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
					<?php echo UDUtil::mask(str_pad((string)$formdata['cpf_cliente'], 11, STR_PAD_LEFT), '###.###.###-##'); ?>
	          	</div>
	          	<br>
	        </div>

	        <div class="row">
	          	<div class="col-md-7 col-lg-7 form-group">
		            <label for="nome">Nome completo</label>
		            <?php echo form_input(array('name'=>'nome','id'=>'nome','class'=>'form-control','value' => $formdata['nome'])); ?>      
	          	</div>

	          	<div class="col-md-3 col-lg-3 form-group">
		            <label for="data_nascimento">Data Nascimento</label>
		            <?php echo form_input(array('name'=>'data_nascimento','id'=>'data_nascimento','class'=>'form-control','value' =>  $formdata['data_nascimento'] )); ?>
	          	</div>
	        </div>  

	        <div class="row">
	          	<div class="col-md-5 col-lg-5 form-group">
		            <label for="telefone">Telefone</label>
		            <?php echo form_input(array('name'=>'telefone','id'=>'telefone','class'=>'form-control','value' => $formdata['telefone'])); ?>
	          	</div>
	          	<div class="col-md-5 col-lg-5 form-group">
		            <label for="celular">Celular</label>
		            <?php echo form_input(array('name'=>'celular','id'=>'celular','class'=>'form-control','value' => $formdata['celular'])); ?>
	          	</div>    

	          	<!--div class="col-md-4 col-lg-4 form-group">
		            <label for="cep">CEP</label>
		            <?php echo form_input(array('name'=>'cep','id'=>'cep','class'=>'form-control','value' => $formdata['cep'])); ?>
	          	</div-->
	        </div>

	        <!--div class="row">
	          	<div class="col-md-3 col-lg-3 form-group">
		            <label for="numero">Número</label>
		            <?php echo form_input(array('name'=>'numero','id'=>'numero','class'=>'form-control','value' => $formdata['numero'])); ?>
	          	</div>
	          	
	          	<div class="col-md-4 col-lg-4 form-group">
		            <label for="bairro">Bairro</label>
		            <?php echo form_input(array('name'=>'bairro','id'=>'bairro','class'=>'form-control','value' => $formdata['bairro'])); ?>
	          	</div>

	          	<div class="col-md-5 col-lg-5 form-group">
		            <label for="endereco">Endereço</label>
		            <?php echo form_input(array('name'=>'endereco','id'=>'endereco','class'=>'form-control','value' => $formdata['endereco'])); ?>
	          	</div>
	        </div-->

	        <!--div class="row">
	          	<div class="col-md-3 col-lg-3 form-group">
		            <label>Estado</label>
		            <?php
		            $ufs = array();
		            
		            foreach ($estados->result() as $estado) {
		              $ufs[$estado->sigla_uf] = $estado->sigla_uf;
		            }

		            echo form_dropdown('estado', $ufs, 'SC', 'id="estado" class="form-control"');
		            ?>
	          	</div>

	          	<div class="col-md-5 col-lg-5 form-group">
		            <label>Cidade</label>
		            <?php
		            $cid = array();
		            //$cid[''] = '';

		            foreach ($cidades->result() as $cidade) {
		              $cid[$cidade->cod_cidade_auto] = $cidade->desc_cidade;
		            }

		            echo form_dropdown('cidade', $cid, 'Joinville', 'id="cidade" class="form-control"');
		            ?>
	          	</div>
	        </div-->

	       	<div class="row pull-right">
	          	<div class="col-md-4 col-lg-4 form-group">
		            <?php 
		              $data = array(
		                  'class'=> 'btn btn-primary',
		                  'name' => 'button',
		                  'id' => 'btn_salvar',
		                  //'value' => 'Atualizar Cadastro',
		                  'type' => 'submit',
		                  'content' => 'Atualizar Cadastro'
		              );
		              echo form_button($data);
		            ?>
	          	</div>
	        </div>

	        <?php echo form_close(); ?>

			<?php
			if(!empty($formMessage) && $form_origem == 'alterar_senha'){
				$cssOptions = array('alert-danger', 'alert-warning', 'alert-success');
				$cssAlert = $cssOptions[$formMessage[0]-1];
				?>
				<div class="alert <?php echo $cssAlert; ?>">
					<?php echo $formMessage[1]; ?>
				</div>
				<?php
			}
			?>

	        <br><br><br>
	        	<?php 
				$hidden = array('datetime' => date('Ymdhmi'));
				$attributes = array('role'=>'form', 'id'=>'frm_alterar_senha');
	        	echo form_open('paravoce/cadastro/cadastro', $attributes, $hidden); 
	        	?>
			    <div class="row">
			    	<h3 class="titulos">Alterar minha senha</h3>
			        <div class="col-md-4 col-lg-4 form-group">
			            <label for="senha_atual">Senha atual</label>
			            <?php echo form_password(array('name'=>'senha_atual','id'=>'senha_atual','class'=>'form-control')); ?>
			      	</div>

			      	<div class="col-md-4 col-lg-4 form-group">
			            <label for="nova_senha">Nova senha</label>
			            <?php echo form_password(array('name'=>'nova_senha','id'=>'nova_senha','class'=>'form-control')); ?>
			      	</div>

			      	<div class="col-md-4 col-lg-4 form-group">
			            <label for="confirmar_nova_senha">Confirme a nova senha</label>
			            <?php echo form_password(array('name'=>'confirmar_nova_senha','id'=>'confirmar_nova_senha','class'=>'form-control',)); ?>
			      	</div>
			    </div>

			    <div class="row pull-right">
			      	<div class="col-md-4 col-lg-4 form-group">
			      		<input type="submit" class="btn btn-primary" value="Alterar senha" />
			      	</div>
			    </div>
			    <?php echo form_close(); ?>
		</div>
	</div>
</div>